const express = require('express');
const router = express.Router();
const data = [];
for(let i = 1; i < 4; i++)
    data.push({
        id: `${i}`,
        code: `TZTB2019082700-${i}`,
        name: `通知通报-${i}`,
        content: '通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报通知通报',
        noticeTime: '2019-09-04T02:37:44.918Z',
        forwardTo: 'approve',
    });
router.get('/forNotice', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            notices: data
        }
    });
});

const claimSettlements = [];
for(let i = 1; i < 15; i++)
    claimSettlements.push({
        id: `${i}`,
        code: `BXJS2019082700-${i}`,
        forwardTo: 'approve',
    });
router.get('/forClaimSettlement', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            claimSettlements
        }
    });
});

const expenseAdjustments = [];
for(let i = 1; i < 15; i++)
    expenseAdjustments.push({
        id: `${i}`,
        code: `BXJS2019082700-${i}`,
        forwardTo: 'approve',
    });
router.get('/forExpenseAdjustment', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            expenseAdjustments
        }
    });
});

router.get('/forWorkItem', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            workItems: {
                quantity: 10,
                forwardTo: 'aaa'
            }
        }
    });
});
router.get('/forUserDefinedAssistPart', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            workItems: {
                quantity: 20,
                forwardTo: 'aaa'
            }
        }
    });
});
router.get('/forPartServicePrice', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            workItems: {
                quantity: 30,
                forwardTo: 'aaa'
            }
        }
    });
});
router.get('/forPartOrderPlan', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            existData: {
                isExist: true,
                forwardTo: 'aaa'
            }
        }
    });
});
router.get('/forPartBackOrder', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            quantityDatas: {
                quantity: 0,
                forwardTo: 'aaa'
            }
        }
    });
});
router.get('/forPartStock', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            existData: {
                isExist: false,
                forwardTo: 'aaa'
            }
        }
    });
});
module.exports = router;
